xl: save domain config (userdata) under correct domid/uuid
authorIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 13 Jan 2011 00:18:35 +0000 (00:18 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 13 Jan 2011 00:18:35 +0000 (00:18 +0000)
commit8636567f45f2ec20574afb41df26ce3bb719fdd5
tree43d003a1bdeb426a2a394bf4516f9fd87c416e73
parent42c08220ddf158ac230557fa0e7f8cc242432ecf
xl: save domain config (userdata) under correct domid/uuid

Recent changes caused the domain config file to be saved under dom0's
filename in /var/lib/xen.  This was due to the config file being saved
before the domain was created and thus before the domid and uuid were
known.

Fix this by moving the saving code to after creation.

Also, change the "default" initialisation of domid in
xl_cmdimpl.c:create_domain to be domid=-1.  That provides a more
obviously wrong value than 0 (which refers to dom0) so that other bugs
of this kind would be more likely to show up.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c